package com.kaiwukj.android.ufamily.mvp.http.entity.event;

import androidx.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

public class HomeEvent {

    public static final int DYNAMIC_PUBLISH = 1;
    public static final int DYNAMIC_DELETE = 2;
    public static final int USER_BLOCK = 3;//屏蔽用户
    public static final int DYNAMIC_BLOCK = 4;//屏蔽动态
    public static final int POST_LIKE = 5;
    public static final int POST_LIKE_CANCEL = 6;
    public static final int POST_COMMENT = 7;
    public static final int DELETE_COMMENT = 8;
    public static final int POST_ATTENTION = 9;
    public static final int POST_ATTENTION_CANCEL = 10;


    public static final int UPDATE_POSITION = 21;//更新主页单条动态
    public static final int UPDATE_DATA = 31;//更新数据


    @IntDef({DYNAMIC_DELETE, DYNAMIC_PUBLISH, USER_BLOCK, DYNAMIC_BLOCK,
            POST_LIKE, POST_LIKE_CANCEL, POST_COMMENT, DELETE_COMMENT, UPDATE_POSITION,
            POST_ATTENTION, POST_ATTENTION_CANCEL,UPDATE_DATA})
    @Retention(RetentionPolicy.SOURCE)
    public @interface Event {
    }

    @Event
    private int event;
    private Object obj;
    private int dynamicId = -1;//动态ID

    public HomeEvent() {
    }

    public HomeEvent(int event) {
        this.event = event;
    }

    public HomeEvent(int event, Object obj) {
        this.event = event;
        this.obj = obj;
    }

    public HomeEvent(int event, int dynamicId) {
        this.event = event;
        this.dynamicId = dynamicId;
    }

    public HomeEvent(int event, Object obj, int dynamicId) {
        this.event = event;
        this.obj = obj;
        this.dynamicId = dynamicId;
    }

    public int getEvent() {
        return event;
    }

    public void setEvent(int event) {
        this.event = event;
    }

    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }

    public int getDynamicId() {
        return dynamicId;
    }

    public void setDynamicId(int dynamicId) {
        this.dynamicId = dynamicId;
    }
}
